Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

172
Vistas
How to set the value of a state variable in React on running "npm run deploy" in order to get the last updated time

I have a footer component that displays the last updated time to indicate when then website was last updated. That part of it looks like this:

<Typography
    variant="body1"
    noWrap
    component="div"
    sx={{ flexGrow: 1 }}
>
    This website was last updated on: {time}
</Typography> 

When I run npm run deploy in order to deploy the app to GitHub Pages, I want this {time} variable to update with the current time to accurately reflect the last updated time, just before the deploy scripts run. How would I accomplish such a thing?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda